<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>" />
<title><?php echo $this->getTitle() ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="<?php echo htmlspecialchars($this->getDescription()) ?>" />
<meta name="keywords" content="<?php echo htmlspecialchars($this->getKeywords()) ?>" />
<meta name="robots" content="<?php echo htmlspecialchars($this->getRobots()) ?>" />
<link rel="icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
<!--[if lt IE 7]>
<script type="text/javascript">
//<![CDATA[
    var BLANK_URL = '<?php echo $this->helper('core/js')->getJsUrl('blank.html') ?>';
    var BLANK_IMG = '<?php echo $this->helper('core/js')->getJsUrl('spacer.gif') ?>';
//]]>
</script>
<![endif]-->
<?php echo $this->getCssJsHtml() ?>
<?php echo $this->getChildHtml() ?>
<?php echo $this->helper('core/js')->getTranslatorScript() ?>
<?php echo $this->getIncludes() ?>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/responsive.css');?>" media="screen" />
<?php
	$bgsettingModel=Mage::getSingleton('bgsetting/bgsetting')->load(1);
?>

<style type="text/css">
body{
<?php if($bgsettingModel->getBgImage()!=''){ ?>
		background-image: url(<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'bgimage/' . $bgsettingModel->getBgImage(); ?>) !important;
<?php } ?>
<?php if($bgsettingModel->getBgAttachment()!=''){ ?>
		background-attachment: <?php echo $bgsettingModel->getBgAttachment(); ?> !important;
<?php } ?>
<?php if($bgsettingModel->getBgColor()!=''){ ?>
		background-color: <?php echo "#".$bgsettingModel->getBgColor(); ?> !important;
<?php } ?>
<?php if($bgsettingModel->getBgPositionx()!='' || $bgsettingModel->getBgPositiony()!=''){ ?>
		background-position: <?php echo $bgsettingModel->getBgPositionx() . " ".$bgsettingModel->getBgPositiony(); ?> !important;
<?php } ?>
<?php if($bgsettingModel->getBgRepeat()!=''){ ?>
		background-repeat: <?php echo $bgsettingModel->getBgRepeat(); ?> !important;
<?php } ?>
}

</style>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/common.js');?>"></script>
<script type="text/javascript" src="<?php echo $this->getSkinUrl('flex-slider/jquery.flexslider.js');?>"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('flex-slider/flexslider.css');?>" media="screen" />
<script type="text/javascript" src="<?php echo $this->getSkinUrl('cloud-zoom/cloud-zoom.1.0.2.min.js');?>"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('cloud-zoom/cloud-zoom.css');?>" media="screen" />
<script type="text/javascript" src="<?php echo $this->getSkinUrl('superfish/superfish.js');?>"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('superfish/superfish.css');?>" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('superfish/superfish-vertical.css');?>" media="screen" />
<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/jquery.accordion.source.js');?>"></script>
<script type="text/javascript" src="<?php echo $this->getSkinUrl('bootstrap/bootstrap-tooltip.js');?>"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('bootstrap/bootstrap-tooltip.css');?>" media="screen" />
<script type="text/javascript">
  jQuery.noConflict();
  // Code that uses other library's $ can follow here.
</script>